package light.mvc.model.register;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import light.mvc.model.base.IdEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "prescription")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Tprescription extends IdEntity implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Date chargeTime;
	private Date medicineTime;
	private Date addTime;
	private Double sumPrice;
	
	private Set<TmedicinePrescription> medicinePrescriptions = new HashSet<TmedicinePrescription>(0);
	
	
	@OneToMany(mappedBy = "prescription")
	public Set<TmedicinePrescription> getMedicinePrescriptions() {
		return medicinePrescriptions;
	}
	public void setMedicinePrescriptions(
			Set<TmedicinePrescription> medicinePrescriptions) {
		this.medicinePrescriptions = medicinePrescriptions;
	}
	
	public Date getChargeTime() {
		return chargeTime;
	}
	public void setChargeTime(Date chargeTime) {
		this.chargeTime = chargeTime;
	}
	public Date getMedicineTime() {
		return medicineTime;
	}
	public void setMedicineTime(Date medicineTime) {
		this.medicineTime = medicineTime;
	}
	public Date getAddTime() {
		return addTime;
	}
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	public Double getSumPrice() {
		return sumPrice;
	}
	public void setSumPrice(Double sumPrice) {
		this.sumPrice = sumPrice;
	}

	

}
